package com.xingshang.controller;

import com.xingshang.service.RecentPlayedService;
import com.xingshang.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("recent")
public class RecentPlayController {

    @Autowired
    private RecentPlayedService recentPlayedService;

    @GetMapping("list")
    public Result list(@RequestHeader String token,
                       @RequestParam (defaultValue = "1") Integer page,
                       @RequestParam (defaultValue = "10") Integer pageSize
                       ) {
        System.out.println("page = " + page);
        System.out.println("pageSize = " + pageSize);
        return recentPlayedService.getList(token, page, pageSize);
    }
}
